var mongoose = require('mongoose')
mongoose.connect('mongodb://localhost:27017/student')

var userSchame = new mongoose.Schema({
    username: {type: String,required: true },
    password: {type: String,required: true},
    email: {type: String}
})
var userModel = mongoose.model('User',userSchame)
/* 使用实例 */
// var _promise = userModel.insertMany([
//     {username:'zz1',password: 'zz1',email:'zz1'},
//     {username:'zz2',password: 'zz2',email:'zz2'},
// ])

// console.log(_promise instanceof Promise)

module.exports = userModel

